import FormFieldType from '@/components/form/src/types/field-type';
import type { FormSchema } from '@/components/form';

export function createPlaceholderMessage(schema: FormSchema) {
  const component = schema.component;

  if (component === FormFieldType.INPUT) {
    return `请输入${schema.label}`;
  }

  if (
    [FormFieldType.SELECT, FormFieldType.CHECKBOX].includes(
      component,
    )
  ) {
    return `请选择${schema.label}`;
  }
  return '';
}
